﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using F_DAL;
using F_MODEL;
namespace F_BLL
{
    public class UserAddrBll
    {
        UserAddrDal dal = new UserAddrDal();
        /// <summary>
        /// 添加收货/送货地址
        /// </summary>
        /// <returns></returns>
        public bool UserAddrAdd(F_MODEL.UserAddrModel u)
        {
            return dal.UserAddrAdd(u);
        }
        /// <summary>
        /// 地址查询
        /// </summary>
        /// <returns></returns>
        public List<UserAddrModel> UserAddrSel(int UserId)
        {
            return dal.UserAddrSel(UserId);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="UserId"></param>
        /// <returns></returns>
        public int UserAddrDel(int UserId)
        {
            return dal.UserAddrDel(UserId);
        }
        /// <summary>
        /// 添加运单信息
        /// </summary>
        /// <param name="u"></param>
        /// <returns></returns>
        public bool MailsAdd(UserAddrModel u)
        {
            return dal.MailsAdd(u);
        }
        /// <summary>
        /// 提交寄件信息
        /// </summary>
        /// <param name="Userid"></param>
        /// <returns></returns>
        public List<UserAddrModel> MailSel(int Userid)
        {
            return dal.MailSel(Userid);
        }

        /// <summary>
        /// 根据当前登录用户，查询
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="mailStatus"></param>
        /// <returns></returns>
        public List<UserAddrModel> SelectState(int userid)
        {
            return dal.SelectState(userid);
        }

        /// <summary>
        /// 用户接受包裹，修改状态
        /// </summary>
        /// <param name="userid"></param>
        /// <returns></returns>
        public int UpdateState(int userid, int mailId)
        {
            return dal.UpdateState(userid, mailId);
        }
        /// <summary>
        /// 后台审核寄件信息
        /// </summary>
        /// <param name="Userid"></param>
        /// <returns></returns>
        public List<UserAddrModel> MaiUserlSel(int mailStatus)
        {
            return dal.MaiUserlSel(mailStatus);
        }
        /// <summary>
        /// 修改寄件状态信息
        /// </summary>
        /// <param name="mailStatus"></param>
        /// <param name="mailId"></param>
        /// <returns></returns>
        public int UserMailUpd(int mailStatus, int mailId)
        {
            return dal.UserMailUpd(mailStatus, mailId);
        }
        /// <summary>
        /// 包裹信息
        /// </summary>
        /// <param name="Userid"></param>
        /// <returns></returns>
        public List<UserAddrModel> MaildaihuoSel(int mailId)
        {
            return dal.MaildaihuoSel(mailId);
        }



        /// <summary>
        /// 包裹明细
        /// </summary>
        /// <param name="Userid"></param>
        /// <returns></returns>
        public List<UserAddrModel> MingxiSel(int mailId)
        {
            return dal.MingxiSel(mailId);
        }
        /// <summary>
        /// 全部订单
        /// </summary>
        /// <returns></returns>
        public List<UserAddrModel> Pro_quanbu()
        {
            return dal.Pro_quanbu();
        }
    }
}
